<template>
	<view>
	<!-- 头部导航 -->
	  <uni-nav-bar background-color="#3286ed" :statusBar="true" :fixed='true' color="#fff" title="仓库详情"  left-icon="left"   @clickLeft="backFn" ></uni-nav-bar>
	 
				<view class="application">
				<view style="border: solid 1px #c3c3c3;margin-bottom: 5px;">
				<view class="application_one">
				   <view style="font-weight: 600;">{{data.warehouseName}}</view>
				   <view  class="title">仓库编号：{{data.warehouseNo}}</view>
				    <view  class="title">负责人：{{data.responsibleUserName}}</view>
				 <view  class="title">负责部门：{{data.responsibleDeptName}}</view>
				  <view  class="title">地址：{{data.address}}</view>
				</view>
				<view class="Buttom">
					<view class="left" style="border-right: solid 1px #c3c3c3;">
						<!-- <uni-icons class="icon" size="24" color="#fd9540" type="person-filled"></uni-icons> -->
						<span class="name">产品种类</span>
					</view>
					<view class="left">
						<uni-icons class="icon" size="24" color="#55aaff" type="calendar-filled"></uni-icons>
						<span class="name" >{{data.responsibleUserName}}</span>
					</view>
				</view>
				</view>
							
	 
	</view>
	 <u-tabs :list="tablist" class="tabs" lineColor="#fd9540" lineWidth="85px" :activeStyle="{ color: '#fd9540', fontWeight: 'bold', transform: 'scale(1.05)'}":current="index"   @change="changeFn" ></u-tabs>
	<u--form labelPosition="left" class='orderdetails' labelWi	  ref="form1">
		 <view class="box" v-if="index*1===0">
			<u-cell>
				<template #title>
					<view class="u-cell-text">基本信息</view>
			</template>
			</u-cell>
			<u-cell-group>
				<u-cell>
					<view  slot="title" class="u-slot-title">
						<text class="u-cell-text">仓库名</text>
						<text class="u-cell-text">{{data.warehouseName}}</text>
					</view>
				</u-cell>
				<u-cell>
					<view  slot="title" class="u-slot-title">
						<text class="u-cell-text">仓库编号</text>
						<text class="u-cell-text">{{data.warehouseNo}}</text>
					</view>
				</u-cell>
				<u-cell>
					<view  slot="title" class="u-slot-title">
						<text class="u-cell-text">地址</text>
						<text class="u-cell-text">{{data.address}}</text>
					</view>
				</u-cell>
				<u-cell>
					<view  slot="title" class="u-slot-title">
						<text class="u-cell-text">负责部门</text>
						<text class="u-cell-text">{{data.responsibleDeptName}}</text>
					</view>
				</u-cell>
				<u-cell>
					<view  slot="title" class="u-slot-title">
						<text class="u-cell-text">负责人</text>
						<text class="u-cell-text">{{data.responsibleUserName}}</text>
					</view>
				</u-cell>
				<u-cell>
					<view  slot="title" class="u-slot-title">
						<text class="u-cell-text">备注</text>
						<text class="u-cell-text">{{data.remark}}</text>
					</view>
				</u-cell>
				<u-cell>
					<view  slot="title" class="u-slot-title">
						<text class="u-cell-text">期初库存</text>
						<text class="u-cell-text">无需录入</text>
					</view>
				</u-cell>
				</u-cell-group>
				<!-- 系统信息 -->
				<u-cell>
					<template #title>
						<view class="u-cell-text">系统信息</view>
				</template>
				</u-cell>
				<u-cell-group>
					<u-cell>
						<view  slot="title" class="u-slot-title">
							<text class="u-cell-text">创建人</text>
							<text class="u-cell-text">{{data.createBy}}</text>
						</view>
					</u-cell>
					<u-cell>
						<view  slot="title" class="u-slot-title">
							<text class="u-cell-text">创建时间</text>
							<text class="u-cell-text">{{data.createTime}}</text>
						</view>
					</u-cell>
					<u-cell>
						<view  slot="title" class="u-slot-title">
							<text class="u-cell-text">更新时间</text>
							<text class="u-cell-text">{{data.updateTime}}</text>
						</view>
					</u-cell>
					</u-cell-group>
				</view>
	</u--form>
	</view>
</template>

<script>
	import {getWarehouse} from '@/api/warehouse/warehouse.js'
	export default {
		data() {
			return {
				data:{},
				index:0,
				tablist:[
					{name:'基本信息'},
					 
				],
			};
		},
		onLoad(e) {
			console.log(e);
			this.initDta(e)
		},
		methods:{
			async initDta(e){
				let res=await getWarehouse(e.id)
				this.data=res.data
			},
			changeFn(e){
				this.inidex=e.index
				 
			},
			
			backFn(){
				 uni.redirectTo({
				 	url:'/pages/WareHouse/WareHouse'
				 })
			}
		}
	}
</script>

<style lang="scss">
.application{
		  background-color: #fff;
		 
		  .application_one{
			  border-bottom: 1px solid #ccc;
			  padding: 10px;
			  font-size: 16px;
			  .title{
				  font-size: 12px;
				  margin-top: 5px;
			  }
		  }
		  .Buttom{
		  	 display: flex;
		  	 justify-content: space-between;
		  	min-height: 35px;
		  			 background-color: #fff;	
		   .left{
		  		width: 50%;
		  		height: 35px;
		  		line-height: 35px;
				margin-left: 15px;
		  		.icon,.name{
		  		vertical-align:middle;
		  		 }
		  		.name{
		  		padding-left: 10px;
				font-size: 14px;
		  		}
		  		 
		  		}
		  		
		  }
	  }
	  .tabs{
	  	background-color: #fff;
	  }
	  .orderdetails{
	  	background-color: #fff;
	  		.u-slot-title{
	  			.u-cell-text{
	  				margin-right: 15px;
	  			}
	  		}
			}
</style>
